$(function () {
    $("#myTreeMenu").tree({
        url:"/menu/selectMenuByEmpId.do",
        animate:true,
        fit:true,
        closed:true,
        onClick:function (node) {
            if (node.url) {
                var tab = $("#myTabs").tabs('exists',node.text);
                if (tab) {
                    $("#myTabs").tabs('select',node.text);
                }else{
                    $("#myTabs").tabs('add',{
                        title:node.text,
                        closable:true,
                        content:'<iframe src='+node.url+' width="100%" height="100%" frameborder="0"></iframe>'
                    });
                }
            }else{
                $("#myTree").tree('toggle',node.target);
            }
        }
    })
})